<template>
	<view class="content">
		<view class="avabox">
			<img class="avatar" :src="userinfo.avatar" alt="">
			<view class="tit">
				个人头像
			</view>
		</view>
		<view class="infobox">
			<view class="">
				昵称
			</view>
			<view class="">
				{{userinfo.name}}
			</view>
		</view>
		<view class="infobox">
			<view class="">
				手机号
			</view>
			<view class="">
				{{userinfo.mobile}}
			</view>
		</view>
		<view class="infobox">
			<view class="">
				可用余额
			</view>
			<view class="">
				{{userinfo.balance}}
			</view>
		</view>
		<view class="infobox">
			<view class="">
				加入时间
			</view>
			<view class="">
				{{userinfo.createdDate.slice(0,10)}}
			</view>
		</view>
		<view class="infobox" @tap="jump('/pages/user/clearuser')">
			<view class="">
				注销账号
			</view>
			<view class="">
				<text class="u-iconfont uicon-arrow-right" style="color: #bfbfbf;"></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo:uni.getStorageSync('userinfo')
			}
		},
		methods: {
			jump(path, query) {
				this.$Router.push({
					path: path,
					query: query
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		padding: 100rpx 0rpx 0 0rpx;
	}
	.avabox{
		width: 100%;
		height: 300rpx;
		text-align: center;
		// line-height: 200rpx;
		// overflow: hidden;
		.tit{
			margin-top: 20rpx;
			height: 30rpx;
		}
		img{
			width: 230rpx;
			height: 230rpx;
			border-radius: 200rpx;
		}
	}
	.infobox{
		margin-top: 20rpx;
		padding: 0 30rpx 0 30rpx;
		display: flex;
		justify-content: space-between;
		height: 100rpx;
		align-items: center;
		background-color: #fff;
	}
</style>
